home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / jockdem5.arc / READDEM3.PAS < prev    next >
Pascal/Delphi Source File  |  1991-04-28  |  2KB  |  90 lines

  1. Program ReadTTT5_Demo_3;
  2.  
  3. {$V-}  {turn of string checking}
  4.  
  5. Uses CRT, FastTTT5, READTTT5;
  6.  
  7.  
  8. const
  9.     UpArrow  = #200;
  10.     DnArrow  = #208;
  11.     EnterKey = #13;
  12.     F10Key   = #196;
  13. var
  14.   ProgramName,
  15.   UserId,
  16.   Password: String;
  17.   Active_Field : byte;
  18.  
  19.    Procedure Set_Up_Screen;
  20.    {}
  21.    begin
  22.        clrscr;
  23.        FBox(10,5,70,20,yellow,blue,1);
  24.        WriteBetween(10,70,5,yellow,blue,' READTTT5 Demo 3 ');
  25.        WriteBetween(10,70,8,white,blue,'Enter the data and press F10 to proceed');
  26.        WriteAt(15,13,lightgray,blue,'Program name:');
  27.        ClearText(30,13,54,13,black,lightgray);
  28.        WriteAt(15,15,lightgray,blue,'Access Userid:');
  29.        ClearText(30,15,39,15,black,lightgray);
  30.        WriteAt(15,17,lightgray,blue,'Password:');
  31.        ClearText(30,17,59,17,black,lightgray);
  32.    end; {of proc Set_Up_Screen}
  33.  
  34.    Procedure Get_Field_Input;
  35.    {}
  36.    begin
  37.        Case Active_Field of
  38.        1 : begin
  39.                Read_String_Upper(30,13,25,'',0,ProgramName);
  40.                Case R_Char of
  41.                UpArrow : Active_Field := 3;
  42.                EnterKey,
  43.                DnArrow : Active_Field  := 2;
  44.                end {case}
  45.            end;
  46.        2 : begin
  47.                Read_String(30,15,10,'',0,UserId);
  48.                Case R_Char of
  49.                UpArrow : Active_Field := 1;
  50.                EnterKey,
  51.                DnArrow : Active_Field  := 3;
  52.                end {case}
  53.            end;
  54.        3 : begin
  55.                Read_Password(30,17,30,'',0,Password);
  56.                Case R_Char of
  57.                UpArrow : Active_Field := 2;
  58.                EnterKey,
  59.                DnArrow : Active_Field  := 1;
  60.                end {case}
  61.            end;
  62.        end;
  63.    end; {of proc Get_Field_Input}
  64.  
  65.  
  66.  
  67. begin
  68.     Clrscr;
  69.     ProgramName := '';
  70.     UserId := '';
  71.     Password := '';
  72.     Active_Field := 1;
  73.     Set_Up_Screen;
  74.     with RTTT do
  75.     begin
  76.         WhiteSpace := ' ';
  77.         End_Chars := [UpArrow, DnArrow, EnterKey, F10Key];
  78.         AllowEsc := false;
  79.     end;
  80.     Repeat
  81.          Get_Field_Input;
  82.     Until R_Char = F10Key;  {F10}
  83.     clrscr;
  84.     WriteAT(1,5,white,black,'Run DemoTTT.exe for the main demo program');
  85.     WriteAT(1,6,white,black,'TechnoJock''s Turbo Toolkit v5.0');
  86.     GotoXY(1,7);
  87. end.
  88.  
  89.  
  90.